<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<title>个人中心</title>
	<script src="__INDEX__/js/mui.min.js"></script>
	<link href="__INDEX__/css/mui.min.css" rel="stylesheet" />
	<link rel="stylesheet" href="__INDEX__/css/iconfont.css" />
	<link rel="stylesheet" href="__INDEX__/css/style.css" />
	<link rel="stylesheet" href="__INDEX__/css/yund.css" />
</head>

<body>
	<header class="mui-bar mui-bar-nav">
		<h1 class="mui-title">个人中心</h1>
	</header>
	<div class="mui-content">
		<div class="mem_topbox">
			<div class="mem_top">
				<div class="mem_img"><img src="{$user_info.logo|default='__INDEX__/bg.png'}"></div>
				<div class="mem_info">
					<p class="mem_nam">
						{$user_info['nick_name']}
					</p>
					<p class="mem_levelbox">
						<span class="mem_level">VIP会员</span>
					</p>
				</div>
			</div>
			<ul class="mem_yebox clearfix">
		    	<li>
		    		<a href="{:url('member/yue_record')}">
			    		<p class="num">{$user_info['money']}</p>
			    		<p class="type">余额</p>
		    		</a>
		    	</li>
		    	<li>
		    		<a href="{:url('member/gongyi_record')}">
			    		<p class="num">{$user_info['gongyi']}</p>
			    		<p class="type">积分</p>
		    		</a>
		    	</li>
		    </ul>
		</div>
		<div class="my_orders">
	    	<div class="bt clearfix"><a href="{:url('member/orders')}"><i class="iconfont icon-icon_order"></i>我的订单</a></div>	
	    	<ul class="mui-table-view mui-grid-view mui-grid-9">
	            <li class="mui-table-view-cell mui-media">
	            	<a href="{:url('member/orders',['status'=>1])}">
	                    <span class="mui-icon iconfont icon-gerenzhongxindingdandaifukuan"><span class="mui-badge">{$data['d_fk']?$data['d_fk']:0}</span></span>
	                    <div class="mui-media-body">待付款</div>
	            	</a>
	            </li>
	            <li class="mui-table-view-cell mui-media">
	            	<a href="{:url('member/orders',['status'=>2])}">
	                    <span class="mui-icon iconfont icon-daifahuo"><span class="mui-badge">{$data['d_fh']?$data['d_fh']:0}</span></span>
	                    <div class="mui-media-body">待发货</div>
	            	</a>
	            </li>
	            <li class="mui-table-view-cell mui-media">
	            	<a href="{:url('member/orders',['status'=>3])}">
	                    <span class="mui-icon iconfont icon-daishouhuo"><span class="mui-badge">{$data['d_sh']?$data['d_sh']:0}</span></span>
	                    <div class="mui-media-body">待收货</div>
	            	</a>
	            </li>
	            <li class="mui-table-view-cell mui-media">
	            	<a href="{:url('member/orders',['status'=>4])}">
	                    <span class="mui-icon iconfont icon-daipingjia"><span class="mui-badge">{$data['d_pj']?$data['d_pj']:0}</span></span>
	                    <div class="mui-media-body">待评价</div>
	            	</a>
	            </li>
	    	</ul>	    	    	
	    </div>
		<ul class="mui-table-view mui-grid-view mui-grid-9 mem_nav">
            <li class="mui-table-view-cell mui-media">
            	<a href="{:url('member/invite')}">
                    <span class="mui-icon iconfont icon-tuiguang"></span>
                    <div class="mui-media-body">推广中心</div>
            	</a>
            </li>
            <li class="mui-table-view-cell mui-media">
            	<a href="{:url('member/feedback')}">
                    <span class="mui-icon iconfont icon-survey"></span>
                    <div class="mui-media-body">意见反馈</div>
            	</a>
            </li>
            <li class="mui-table-view-cell mui-media">
            	<a href="{:url('member/edit_password')}">
                    <span class="mui-icon iconfont icon-xiugaimima"></span>
                    <div class="mui-media-body">修改密码</div>
            	</a>
            </li>
            <li class="mui-table-view-cell mui-media">
            	<a href="{:url('member/address')}">
                    <span class="mui-icon iconfont icon-weibiaoti2fuzhi08"></span>
                    <div class="mui-media-body">收货地址</div>
            	</a>
            </li>
            <li class="mui-table-view-cell mui-media">
            	<a href="{:url('member/about')}">
                    <span class="mui-icon iconfont icon-guanyuwomen"></span>
                    <div class="mui-media-body">关于我们</div>
            	</a>
            </li>
            <li class="mui-table-view-cell mui-media">
            	<a href="#" onclick="logout('{:url('login/logout')}')">
                    <span class="mui-icon iconfont icon-tuichu"></span>
                    <div class="mui-media-body">退出</div>
            	</a>
            </li>
    	</ul>	    
		
	</div>
	{include file="public/bottom" /}
</body>
</html>
{include file="public/footer" /}
<script type="text/javascript">
	$(".mem_img").click(function() {
		window.location.href = "{:url('member/update')}";
	});
	
	function logout() {
		layer.confirm('您确定要退出吗？', {
			btn: ['确定', '取消']
		}, function() {
			$.ajax({
				url: "{:url('index/logout')}",
				data: {
				},
				success: function(data) {
					if(data.code == 200) {
						layer.msg(data.msg, {
							icon: 1,
							time: 1500
						}, function() {
							location.href = "{:url('index/index')}";
						});
					}
				}
			})
		})
	}
	
</script>
